<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/MasterPage.Master" Inherits="System.Web.Mvc.ViewPage<Animoso.Domain.Event>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Edit
</asp:Content>



<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <script language="javascript" type="text/javascript">
    $(document).ready(function() {
        $("#dateTime").datepicker({ altFormat: 'dd-mm-yy' });
    });
    </script>
    <h2>Wijzig Event</h2>

    <%= Html.ValidationSummary("Edit was unsuccessful. Please correct the errors and try again.") %>

    <% using (Html.BeginForm()) {%>

        <fieldset>
            <legend>Event Gegevens</legend>
            <p>
                <label for="Name">Naam:</label><br />
                <%= Html.TextBox("Name", Model.Name) %>
                <%= Html.ValidationMessage("Name", "*") %>
            </p>
            <p>
                <label for="DateTime">Datum:</label><br />
                <%= Html.TextBox("DateTime", String.Format("{0:g}", Model.DateTime), new { id = "dateTime" })%>
                <%= Html.ValidationMessage("DateTime", "*") %>
                
            </p> 
            <p>
                <label for="Description">Beschrijving:</label><br />
                <%= Html.TextBox("Description",Model.Description)%>
                <%= Html.ValidationMessage("Description", "*") %>
                
            </p>             
            <p>
                <%=Html.Hidden("Id", Model.Id) %>
                <input type="submit" value="Wijzigen" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%=Html.ActionLink("Back to List", "Index") %>
    </div>
    
    <script type="text/javascript">
        $(function() {
            $("#dateTime").datepicker();
        });
    </script>
</asp:Content>

